﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace FwProject.Migrations.FwProjectAppShopDb
{
    public partial class add_DiscountPrice_To_ShopOrderDetails : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "OrderNumber",
                table: "shop_order_details",
                nullable: true,
                oldClrType: typeof(string));

            migrationBuilder.AddColumn<decimal>(
                name: "DiscountPrice",
                table: "shop_order_details",
                nullable: false,
                defaultValue: 0m);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "DiscountPrice",
                table: "shop_order_details");

            migrationBuilder.AlterColumn<string>(
                name: "OrderNumber",
                table: "shop_order_details",
                nullable: false,
                oldClrType: typeof(string),
                oldNullable: true);
        }
    }
}
